
#pragma once

// header file
#ifdef MAINTAINVT_EXPORTS
#define MAINTAIN_VT_API __declspec(dllexport)
#else
#define MAINTAIN_VT_API __declspec(dllimport)
#endif


// #include <TBVTServer.h>
// using namespace IModuleFutureTrader;

struct AccountInfo
{
	string userId;
	string userName;
	string userPassword;
	int openday;
	bool enable;
	__int64 lastDayClearTime;
};

class MAINTAIN_VT_API MaintainVT
{
public:
	void init();
	void release();

	bool IsConnected();

	bool OpenAccount(string userId,string& failReason);
	bool CloseAccount(const string& traderId, string& failReason);
	bool MoneyDeposit(const string& traderId, Double money, string& failReason);
	bool MoneyDrawing(const string& traderId, Double money, string& failReason);
	bool ChangePassword(const string& traderId, const string& newPasswd, string& failReason);
	bool GetUserInfo(const string& traderId, AccountInfo& userinfo,string& failReason);
};
